package database;

/**
 * @author aioros
 * 
 * Release informations
 */
public class Release {

	/*-------------------- Fields ------------------------*/
	
	/** release id */
	private String rlsid;
	
	/** release version */
	private String version;
	
	/** release branch */
	private String branch;
	
	/** release last update */
	private String lastupdate;
	
	/** release release note */
	private String releasenote;
	
	/** release hash */
	private String rlshash;
	
	/** 
	 * release status 
	 * -> active
	 * -> deprecated
	 * -> deleted
	 */
	private String status;
	
	/**
	 * release state
	 * -> devel
	 * -> stable
	 */
	private String state;
	
	/**
	 * release install state
	 * -> installed
	 * -> not installed
	 */
	private String install;
	
	
	
	
	/*-------------------- Constructor ------------------------*/
	
	/**
	 * Build a release
	 */
	public Release(){
		
	}


	
	
	/*-------------------- Methodes ------------------------*/
	
	public String getBranch() {
		return branch;
	}




	public void setBranch(String branch) {
		this.branch = branch;
	}




	public String getLastupdate() {
		return lastupdate;
	}




	public void setLastupdate(String lastupdate) {
		this.lastupdate = lastupdate;
	}




	public String getReleasenote() {
		return releasenote;
	}




	public void setReleasenote(String releasenote) {
		this.releasenote = releasenote;
	}




	public String getRlsid() {
		return rlsid;
	}




	public void setRlsid(String rlsid) {
		this.rlsid = rlsid;
	}




	public String getRlshash() {
		return rlshash;
	}




	public void setRlshash(String rlshash) {
		this.rlshash = rlshash;
	}




	public String getStatus() {
		return status;
	}




	public void setStatus(String status) {
		this.status = status;
	}




	public String getVersion() {
		return version;
	}




	public void setVersion(String version) {
		this.version = version;
	}
	
	
	public String toString(){
		
		String srelease = " \n";
		
		srelease += "		-> rlsid :" + rlsid + "\n";

		srelease += "			- version : " + version + "\n";

		srelease += "			- branch : " + branch + "\n";
		
		srelease += "			- lastupdate : " + lastupdate + "\n";

		srelease += "			- releasenote : " + releasenote + "\n";

		srelease += "			- rlshash : " + rlshash + "\n";
		
		srelease += "			- status : " + status + " \n";
		
		srelease += "			- install : " + install + " \n";
		
		
		return srelease;
	}




	public String getInstall() {
		return install;
	}




	public void setInstall(String install) {
		if (install == null){
			
			this.install = "not installed";
		}else {
		
			this.install = install;
		}
	}




	public String getState() {
		return state;
	}




	public void setState(String state) {
		this.state = state;
	}

}
